package com.management.service.Impl;

import com.management.dao.PostDao;
import com.management.po.Post;
import com.management.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XS
 * 职位表业务逻辑实现类
 * @version 1.0
 */
@Service
public class PostServiceImpl implements PostService {
    @Autowired
    PostDao postDao;
    @Override
    public List<Post> findAll() {
        List<Post> list = postDao.findAll();
        return list;
    }

    @Override
    public Post findByPostId(int postId) {
        return postDao.findByPostId(postId);
    }

    @Override
    public boolean add(Post post) {
        return postDao.add(post)>0?true:false;
    }

    @Override
    public boolean update(Post post) {
        return postDao.update(post)>0?true:false;
    }
}
